package com.example.demo.controller;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.bean.Person;


@RestController
public class MyController {

	@RequestMapping(value="/person/{personId}",method=RequestMethod.GET,
			produces = MediaType.APPLICATION_JSON_VALUE)
	public Person findPerson() {
		Person person = new Person();
		person.setId(1);
		person.setAge(18);
		person.setName("springcloud");
		
		return person;
	}
}
